package net.lummox.command;

import javax.ejb.EJB;

import net.lummox.model.AiDao;
import net.lummox.model.Turn;

public abstract class CommandImpl implements Command {

	@EJB
	protected AiDao aiDao;

	@Override
	public abstract Turn execute(Turn turn);

	@Override
	public abstract String getName();

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CommandImpl other = (CommandImpl) obj;
		if (getName() == null) {
			if (other.getName() != null)
				return false;
		} else if (!getName().equals(other.getName()))
			return false;
		return true;
	}
}
